﻿using System;

namespace FullSearch.Common
{
    [AttributeUsage(AttributeTargets.Property)]
    public class DocFieldAttribute : Attribute
    {
        /// <summary>
        /// 是否存储
        /// </summary>
        public bool Stored { get; set; }

        /// <summary>
        /// 是否分词
        /// </summary>
        public bool Analyzer { get; set; }

        /// <summary>
        /// 是否启动docvalues
        /// </summary>
        public bool DocValues { get; set; }

        /// <summary>
        /// 是都使用facet
        /// </summary>
        public bool Facet { get; set; }

        /// <summary>
        /// 是否使用空间索引
        /// </summary>
        public bool Geo { get; set; }

        public DocFieldAttribute(bool stored = true, bool analyzer = false, bool docValues = true, bool facet = false, bool geo = false)
        {
            Stored = stored;
            Analyzer = analyzer;
            DocValues = docValues;
            Facet = facet;
            Geo = geo;
        }
    }
}
